$(function () {
    // $('input[type=text]').on('click',function () {
    //     $('input[type=text]').css('outline',"none")
    //     console.log($('input[type=text]'))
    // })

    for (let i=0;i<3;i++){
        $('.nav-item:eq('+i+')').mouseover(function () {
            $('.nav-item').removeClass('active')
            $('.nav-item:eq('+i+')').addClass('active')
        })
    }

    // 导航栏固定顶部
    $(document).ready(function(e) {
        var counter = 0;
        if (window.history && window.history.pushState) {
            $(window).on('popstate', function () {
                window.history.pushState('forward', null, '#');
                window.history.forward(1);
                location.replace(document.referrer);//刷新
            });
        }
        window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
        window.history.forward(1);
    });

    let head = $('#bugxx').height()
    $('.body').css({'margin-top':''+head+'px'})
        window.addEventListener('resize',function () {
            let head = $('#bugxx').height()
            $('.body').css({'margin-top':''+head+'px'})
        },false)
        $('a').click(function () {
                let head = $('#bugxx').height()
                $('.body').css({'margin-top':''+head+'px'})
        })
    
})